package com.example.good.controller;

import com.example.good.entity.User;
import com.example.good.service.LoginService;
import com.example.good.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class LoginController {
    
    @Autowired
    LoginService loginService;
    
    @GetMapping("/login")
    public Result login(@RequestBody User user){
        
        return loginService.Login(user);
    }
    
}
